Setting up onload event actions Onload event actions are triggered after a Web page loads, before any user interaction occurs. These actions execute before any other actions in the document. To add an onload action, insert a head action icon from the Smart tab of the Adobe GoLive Objects palette. Dragging the Head Action icon from the Objects palette into the header region of your page sets the action to trigger when the page loads. This type of action can only be added to the header and will automatically add the onload event handler into the <Body> tag. Use this type of action only when you want something to happen when the page finishes loading. Dragging an Action Item icon from the Objects palette to the body section of your document inserts a script item in the body of the page that serves as a placeholder for HTML code that triggers when the browser loads the body section. The action will occur when the browser reaches this position when parsing the document. (OnParse actions execute while the page is loading.) To set up a Head Action: 1 Drag the Head Action icon from the Smart tab ( ![]() If the head section is not open, drag the Head Action icon to the small triangle directly below the Layout tab; when the head section opens drop in the icon. 2 Set up the action in the Action Inspector. For instructions on using individual actions, see Using Adobe GoLive actions. ![]() Choose an action to be triggered by the action item.
To set up a Body Action action: 1 Drag the Body Action icon from the Smart tab ( ![]() 2 In the Body Action Inspector, choose the Document Write action (see Document Write) from the Message submenu of the Action menu, and set it up as desired. 3 Preview the action in a 4.0 browser. Using Actions > Setting up actions > Setting up onload event actions |